package ru.amse.tsyganov.jumleditor.view.lines;

public abstract class Line {

	public abstract int getX1();

	public abstract int getX2();

	public abstract int getY1();

	public abstract int getY2();
	
	public abstract void setX1(int x1);

	public abstract void setX2(int x2);

	public abstract void setY1(int y1);

	public abstract void setY2(int y2);
	
	public abstract boolean isHorizontal();
	
	public double getLength() {
		return Math.sqrt(Math.pow(getX2() - getX1(), 2) + Math.pow(getY2() - getY1(), 2));
	}
}
